﻿using AutoMapper;
using BCDto.Common.Service.WebsiteServiceItem;
using BCDto.Common.Service.WebsiteServiceType;
using BCEntity.Common.Service.WebsiteServiceItem;
using BCEntity.Common.Service.WebsiteServiceType;
using System;
using System.Collections.Generic;
using System.Text;

namespace BCService.MapperProfiles.Common.Service
{
    public class WebsiteServiceProfile : Profile
    {
        public WebsiteServiceProfile()
        {

            //官网服务类型
            CreateMap<WebsiteServiceTypeDto, WebsiteServiceTypeEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WebsiteServiceTypeRequestDto, WebsiteServiceTypePutDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WebsiteServiceTypeRequestDto, WebsiteServiceTypeEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WebsiteServiceTypePutDto, WebsiteServiceTypeEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WebsiteServiceTypeEntity, WebsiteServiceTypeDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WebsiteServiceTypeEntity, WebsiteServiceViewDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();

            //官网服务项目
            CreateMap<WebsiteServiceItemDto, WebsiteServiceItemEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WebsiteServiceItemRequestDto, WebsiteServiceItemPutDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WebsiteServiceItemRequestDto, WebsiteServiceItemEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WebsiteServiceItemPutDto, WebsiteServiceItemEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WebsiteServiceItemEntity, WebsiteServiceItemDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WebsiteServiceItemEntity, WebsiteServiceItemViewDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
        }
    }
}
